Conversation
Vadzimz-homework-6
vadzimz homework 6.clj
XOMAv2
reviewed
May 14, 2024
| (deftest test-get-idx | ||
| (testing "legal args" | ||
| (are [a b] (= b (#'sut/get-idx a)) | ||
| 8448 136.0 4944 79.0 5310 85.0 9626 155.0 5217 84.0)) |
Collaborator
There was a problem hiding this comment.
Я бы поместил каждую пару на отдельную строку для большей читабельности
Comment on lines
+10
to
+12
| (is (thrown? ClassCastException (#'sut/get-idx "8448"))) | ||
| (is (thrown? ClassCastException (#'sut/get-idx [8448]))) | ||
| (is (thrown? ClassCastException (#'sut/get-idx {:i 8448}))))) |
Collaborator
There was a problem hiding this comment.
Почему бы не поместить их в are?
| (is (thrown? ClassCastException (#'sut/get-idx [8448]))) | ||
| (is (thrown? ClassCastException (#'sut/get-idx {:i 8448}))))) | ||
|
|
||
| (deftest test-get-character-by-idx |
Collaborator
There was a problem hiding this comment.
кажется здесь не хватает 0 как граничного значения
| (is (thrown? ClassCastException (#'sut/get-character-by-idx {:i 5047}))) | ||
| (is (nil? (#'sut/get-character-by-idx -5047))))) | ||
|
|
||
| (deftest test-int->id |
Collaborator
There was a problem hiding this comment.
аналогично, я бы здесь добавил тест на 0
| (is (thrown? ClassCastException (sut/int->id {:int 56544447}))) | ||
| (is (empty? (sut/int->id -56544447))))) | ||
|
|
||
| (deftest test-id->int |
Collaborator
There was a problem hiding this comment.
А здесь в качестве граничного значения не помешала бы пустая строка.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.